<template>
    <div>
        <Child :parentMsg="msg" @send="recieve"></Child>

        <Child2 :parentMsg="msg" @send2="recieve2"></Child2>
    </div>
</template>

<script>
import Child from './Child.vue'
import Child2 from './Child2.vue'
    export default {
        props: {
            
        },
        components: {
            Child,
            Child2
        },
        data(){
            return {
                msg:"hello"
            }
        },
        methods: {
            recieve(value){
                console.log("接收到从子组件传递过来的数据是："+value);
            },
            
            recieve2(value2){
                console.log("接收到从子组件传递过来的数据是："+value2);
            }
        }
    }
</script>

<style>

</style>